package top.tagao.m02_creationalPatterns.c_01_builder.builders;

import top.tagao.m02_creationalPatterns.c_01_builder.cars.Car;
import top.tagao.m02_creationalPatterns.c_01_builder.cars.Manual;

/**
 * 具体建造者(Concrete Builder）
 * @author fu-xiao-liu
 * @Date 2022/7/24 14:41
 */
public class CarManualBuilder implements  Builder{
    private String type;
    private int seats;
    private String engine;
    private String transmission;
    private String tripComputer;
    private String gpsNavigator;
    Manual manual;
    @Override
    public void setCarType(String type) {
        this.type = type;
    }

    @Override
    public void setSeats(int seats) {
        this.seats = seats;
    }

    @Override
    public void setEngine(String engine) {
        this.engine = engine;
    }

    @Override
    public void setTransmission(String transmission) {
        this.transmission = transmission;
    }

    @Override
    public void setTripComputer(String tripComputer) {
        this.tripComputer = tripComputer;
    }

    @Override
    public void setGPSNavigator(String gpsNavigator) {
        this.gpsNavigator = gpsNavigator;
    }
    public Manual getResult() {
        manual =  new Manual(type, seats, engine, transmission, tripComputer, gpsNavigator);
        return manual;
    }
}
